<template>
	<view class="container">
		<view class="title">总经办</view>
		<view class="sub-title">风险分级管控及隐患排查治理清单</view>
		<view class="table">
			<view class="tr">
				<view class="td">编号</view>
				<view class="td">{{ info.id || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">风险点类型</view>
				<view class="td">{{ info.type || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">风险点名称</view>
				<view class="td">{{ info.title || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">风险点等级</view>
				<view class="td">{{ info.levelName || '' }}</view>
			</view>
			<view class="tr">
				<view class="td">管控单位</view>
				<view class="td">{{ info.gk_level || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">危险源或<br/>潜在事件</view>
				<view class="td">{{ info.may_danger || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">管控措施</view>
				<view class="td">{{ info.measure || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">排查方法</view>
				<view class="td">{{ info.method || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">排查周期</view>
				<view class="td">{{ info.cycle || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">是否存在隐患</view>
				<view class="td">{{ info.is_yinhuan || '无' }}</view>
			</view>
			<view class="tr">
				<view class="td">处理结果</view>
				<view class="td">{{ info.chuli || '无' }}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default{
	data(){
		return {
			id: '',
			info: {
				id: '',
				type: '',
				title: '',
				levelName: '',
				gk_level: '',
				may_danger: '',
				measure: '',
				method: '',
				cycle: '',
				is_yinhuan: '',
				chuli: ''
			}
		}
	},
	onLoad(option){
		this.id = option.id;
		this.getRiskCheckDetail();
	},
	methods: {
		// 获取数据
		getRiskCheckDetail(){
			let _this = this;
			uni.request({
				url: _this.$API.gridRiskCheckDetail,
				data: { id: _this.id },
				header: _this.$API.get_head(),
				success: (res)=>{
					_this.info = res.data.data;
					if(_this.info.level == 1) _this.info.levelName = 'I级';
					if(_this.info.level == 2) _this.info.levelName = 'II级';
					if(_this.info.level == 3) _this.info.levelName = 'III级';
					if(_this.info.level == 4) _this.info.levelName = 'IV级';
				}
			})
		}
	}
}
</script>

<style scoped>
.container{
	padding: 40upx 30upx;
}
.title,
.sub-title{
	font-size: 28upx;
	font-weight: bold;
	line-height: 1.2;
	text-align: center;
}
.sub-title{
	margin-bottom: 20upx;
}


</style>
